﻿<%@ include file="/WEB-INF/views/framework/global.jsp"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<% 
	String updateMessage = (String)request.getParameter("updateMessage");
	if(updateMessage==null || updateMessage.equals("null")){
		updateMessage = "";
	}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>论文</title>
</head>
<body class="kk">
	<ul class="nav nav-tabs g_navbar">
		<li><a href="${reqRoot}">论文</a></li>
		<li class="active"><a href="#">论文编辑</a></li>
	</ul>
	<div class="framework_container">
		<c:if test="${paper.status!= 'SUBMIT'}">
		<div class="row">
			<div class="col-md-1"></div>
			<div class="col-md-10">
				<form:form modelAttribute="uploadItem" class="form-horizontal"
					action="${reqRoot}/update" name="frm" method="post"
					enctype="multipart/form-data">
					<div class="form-group">
						<label class="col-md-2 control-label" for="name">论文名称</label>
						<div class="col-md-10">
							<input type="text" class="form-control" id="exampleInputEmail1"
								name="name" placeholder="论文名称" value="${paper.name}">
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-2 control-label" for="content">论文描述</label>
						<div class="col-md-10">
							<textarea id="editor_id" name="content"
								style="width: 100%; height: 250px;">${paper.content}</textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-2 control-label" for="image">论文上传</label>
						<div class="col-md-10">
							<div class="mb5"><form:input path="fileData" id="image" type="file" /></div>
							<div>允许上传的文件格式：${fileExt}，大小：${fileSize}</div>
						</div>
					</div>
					<div class="form-group tc"> <%=updateMessage %> </div>
					<div class="form-group tc">
						<button type="submit" class="btn btn-success mr20" id="submit">保存</button>
					</div>
				</form:form>
			</div>
			<div class="col-md-1"></div>
		</div>
		</c:if>
	    <c:if test="${paper.status=='SUBMIT'}">
			<div class="framework_container mytopic">
				<section class="persion_tip">
					<a class="abs create_report" href="${reqRoot}"><h2 class="fw">您的论文已提交</h2></a>
				</section>
			</div> 
		</c:if>
	</div>
	<!-- /framework_container -->
	
	<script charset="utf-8"
		src="${path}/static/lib/kindeditor-4.1.10/kindeditor.js"></script>
	<script charset="utf-8"
		src="${path}/static/lib/kindeditor-4.1.10/lang/zh_CN.js"></script>
	<script src="${cmpRoot}/paper_update.js"></script>
</body>
</html>
